/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* 头部样式 */
.app-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.app-header h1 i {
    margin-right: 0.5rem;
    color: #fff;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.9);
}

/* 面板样式 */
.config-panel,
.compare-panel,
.upload-panel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.panel-section {
    margin-bottom: 2rem;
}

.panel-section:last-child {
    margin-bottom: 0;
}

.panel-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.panel-section h3 i {
    margin-right: 0.5rem;
    color: #3498db;
}

/* 输入组样式 */
.input-group {
    display: flex;
    gap: 0.5rem;
}

.form-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* 云服务提供商网格 */
.cloud-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.provider-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.provider-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.provider-card:hover::before {
    left: 100%;
}

.provider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.provider-card.selected {
    border-color: #27ae60;
    background: linear-gradient(135deg, #d5f4e6, #a8e6cf);
}

.provider-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.provider-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.provider-status {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.provider-status.configured {
    color: #27ae60;
}

.provider-status.configured i {
    color: #27ae60;
}

/* 比较结果样式 */
.compare-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e1e8ed;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 文件列表 */
.file-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: #f8f9fa;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e1e8ed;
    transition: background-color 0.2s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background-color: #e9ecef;
}

.file-item.new {
    border-left: 4px solid #27ae60;
}

.file-item.modified {
    border-left: 4px solid #f39c12;
}

.file-item.unchanged {
    border-left: 4px solid #95a5a6;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
}

.file-size {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* 文件分组标题 */
.file-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-group-header.new {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #27ae60;
}

.file-group-header.modified {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #f39c12;
}

.file-group-header i {
    font-size: 1rem;
}

/* 无文件消息 */
.no-files-message {
    padding: 2rem;
    text-align: center;
}

.no-files-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #6c757d;
}

.no-files-content i {
    font-size: 3rem;
    color: #28a745;
}

.no-files-content p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* 上传进度样式 */
.progress-container {
    margin-bottom: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.current-file {
    font-weight: 500;
    color: #2c3e50;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 0.5rem;
}

/* 操作面板 */
.action-panel {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.upload-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e1e8ed;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    color: #2c3e50;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e74c3c;
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid #e1e8ed;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

/* 消息提示 */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.message {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
    animation: messageSlideIn 0.3s ease;
    max-width: 300px;
}

.message.success {
    border-left-color: #27ae60;
}

.message.error {
    border-left-color: #e74c3c;
}

.message.warning {
    border-left-color: #f39c12;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .cloud-provider-grid {
        grid-template-columns: 1fr;
    }
    
    .compare-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-panel {
        flex-direction: column;
    }
    
    .progress-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .progress-stats {
        flex-wrap: wrap;
    }
}

/* 表单提示样式 */
.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

/* 云服务选择器样式 */
.cloud-config-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cloud-config-selector .input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-select:hover {
    border-color: #bdc3c7;
}

.account-selector {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.account-selector .form-select {
    flex: 1;
}

.btn-secondary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.connection-status {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-indicator i {
    font-size: 0.8rem;
}

/* 云服务提供商网格样式（保留用于兼容性） */
.cloud-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.provider-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.provider-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.provider-card.selected {
    border-color: #3498db;
    background: linear-gradient(135deg, #ebf3fd, #d6e9ff);
}

.provider-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s ease;
}

.provider-card:hover::before {
    left: 100%;
}

.provider-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.provider-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.provider-status {
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.provider-status.connected {
    color: #27ae60;
}

.provider-status.error {
    color: #e74c3c;
}

.provider-status i {
    font-size: 0.6rem;
}

/* 设置模态框样式 */
.settings-modal {
    max-width: 800px;
    max-height: 95vh;
    overflow: hidden;
}

.settings-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #4facfe;
    border-bottom-color: #4facfe;
    font-weight: 600;
}

.tab-btn:hover {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

.tab-content {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
}

/* 账号管理样式 */
.accounts-section {
    padding: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.section-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.provider-sections {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    flex: 1;
    min-height: 0;
}

.provider-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.provider-section h4 {
    margin: 0 0 1rem 0;
    color: #555;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.account-item:hover {
    border-color: #4facfe;
    box-shadow: 0 2px 8px rgba(79, 172, 254, 0.1);
}

.account-info {
    flex: 1;
}

.account-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.account-details {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    gap: 1rem;
}

.account-badge {
    display: inline-block;
    background: #4facfe;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.account-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.btn-edit {
    background: #28a745;
    color: white;
    border: none;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-default {
    background: #ffc107;
    color: #212529;
    border: none;
}

.btn-default:hover {
    background: #e0a800;
}

.empty-accounts {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

/* 通用设置样式 */
.general-settings {
    padding: 0;
}

.general-settings h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.general-settings .form-group {
    margin-bottom: 1rem;
}

.general-settings label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.general-settings input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* 账号配置模态框样式 */
#accountConfigModal .modal-content {
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#accountConfigModal .modal-body {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    padding: 1.5rem;
}

#accountConfigModal .form-group {
    margin-bottom: 1rem;
}

#accountConfigModal label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

#accountConfigModal input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

#accountConfigModal .form-input {
    width: 100%;
}

#accountConfigModal .modal-header {
    flex-shrink: 0;
}

#accountConfigModal .modal-footer {
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .settings-modal {
        max-width: 95vw;
        margin: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .account-actions {
        width: 100%;
        justify-content: flex-end;
    }
}